/**
 * json配置举例，更多配置请看 IConfigSchema
 * @author luguoxiang
 * @date 2022/7/5
 * 开源项目：https://gitee.com/lgx1992/lg-soar 求star！请给我star！请帮我点个star！
 */
import { basePath } from './api';
import { MenuComponent } from '@/types/interface';

export const columns = [
  {
    colKey: 'service',
    title: '服务',
    ellipsis: true,
    width: 100,
  },
  {
    colKey: 'name',
    title: '日志名称',
    ellipsis: true,
  },
  {
    colKey: 'level',
    title: '日志级别',
    width: 100,
  },
  {
    colKey: 'op',
    title: '操作',
    width: 60,
  },
];

/**
 * 组件配置（用于生成菜单数据）
 */
export const COMPONENTS: MenuComponent[] = [
  {
    title: '日志级别',
    component: () => import('./Index.vue'),
    path: '/system/monitor/logger',
    sort: 10,
    keepalive: false,
    icon: 'bulletpoint',
    permits: [`GET${basePath}/getLevel`],
    elements: [{ title: '更新', code: 'update', permits: [`GET${basePath}/setLevel`] }],
  },
];
